home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_03_05
/
3n05054a
< prev
next >
Wrap
Text File
|
1992-03-08
|
790b
|
30 lines
Listing 1
/*****************************************************/
/* clearfpu.c */
/*****************************************************/
void
ClearFPU(void)
/*****************************************************/
/* -- Safely clear exception bits in the FPU. */
/* -- Ignore all FPU exceptions. */
/* -- Call this routine following each call to */
/* GetMessage() or PeekMessage(). */
/*****************************************************/
{
unsigned wControl;
/* Get the current control word. */
_asm fnstcw wControl;
_asm wait;
/* Ignore all exceptions. */
wControl |= 0x007f;
_asm fnclex;
_asm fldcw wControl;
}